<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<form class="well form-inline margin-top-20" method="post" id="index-from" action="{:url('admin/companyBackup/recordParticular')}">
			<input type = "hidden" name ="id"  value ="{$vo.id|default=0}" >
			<select name="bak_type" class="form-control">
				<option value="0" <?php if( $bak_type == 0 ) echo "selected"; ?> >全部记录</value>
				<option value="2" <?php if( $bak_type == 2 ) echo "selected"; ?> >源码备份记录</value>
				<option value="1" <?php if( $bak_type == 1 ) echo "selected"; ?> >数据库备份记录</value>
			</select>
        </form> 
        <table class="table table-bordered table-hover" style="text-align: center;padding: 20px;">
        	<thead>
        		<tr>
        			<th width="50" style="text-align: center;" >序号</th> 
					<th width="100" style="text-align: center;">备份类型</th>
                    <th width="100" style="text-align: center;">添加时间</th>
					<th width="100" style="text-align: center;">操作人</th>
  					<th style="text-align: center;" >备注信息</th>
					<th width="100" style="text-align: center;">备份时间</th>
        			<th style="text-align: center;" >状态</th>
        			<th style="text-align: center;" >操作</th>
        		</tr>
        	</thead>
        	<tbody>
                <volist name="list" id="vo">
	        		<tr>
	        			<td>{++$key}</td>
						<td>
							<if condition="$vo['backup_type'] eq 1 ">
									数据库备份
								<else />
									源码备份
							</if>
						</td>
	        			<td>{:date( 'Y/m/d H:i:s' , $vo['add_time'])}</td>
						<td>{$vo.operator}</td>
	        			<td style="text-align: center;word-wrap:break-word;word-break:break-all;">{$vo.remarks}</td>
						<td>
	        				<if condition="!empty($vo['bak_time'])">
			        			{:date( 'Y/m/d H:i:s' , $vo['bak_time'])}
			        			<else />
			        			-
			        		</if>
		        		</td>
	        			<td style="color:{$vo.status_color}">
							{$vo.status_str}
	        			</td>
	        			<td>
							<a href="{:url('admin/companyBackup/deleteRecord')}?id={$vo.id}" class="btn btn-danger btn-sm zy-ajax-confirm" data-msg="确定要删除此记录吗？" >删除</a>
	        			</td>
	        		</tr>
	            </volist>
        	</tbody>
        </table>
		<empty name="list">
			暂无记录~
		</empty>
		
		<div class="pager">{$list->render()}</div>
	</div>

	<script src="__STATIC__/js/admin.js"></script>
    <script src="__STATIC__/js/layer/layer.js"></script>
    <script src="__STATIC__/js/custom/custom.js"></script>
<script>
 $('select[name=bak_type]').change(function(){
	$('#index-from').submit();
 });
</script>
</body>
</html>